package com.test.es7.client;

import org.apache.http.HttpHost;
import org.elasticsearch.client.RestClient;
import org.elasticsearch.client.RestClientBuilder;
import org.elasticsearch.client.RestHighLevelClient;

public class ES7ClientUtil {

    public static RestHighLevelClient getClient(){
        HttpHost host=new HttpHost("192.168.1.3",9200);
        RestClientBuilder restClientBuilder= RestClient.builder(host);
        RestHighLevelClient client=new RestHighLevelClient(restClientBuilder);
        return client;
    }
}
